//
//  CapacityViewCell.m
//  OfficeBook
//
//  Created by 朱 琳 on 15/10/5.
//  Copyright (c) 2015年 sunny. All rights reserved.
//

#import "CapacityViewCell.h"

@interface CapacityViewCell()
@property (nonatomic, strong) UILabel *titleLabel;
@end

@implementation CapacityViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
   
    self.titleLabel = [[UILabel alloc]init];
    
    [self.contentView addSubview:self.titleLabel];
    
    [self.titleLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(20);
        make.centerY.equalTo(self.contentView.centerY);
        make.height.equalTo(self.contentView.height);
        make.width.equalTo(self.contentView.width).multipliedBy(0.8);
    }];

    return self;
}

@synthesize title = _title;
- (void)setTitle:(NSString*)title {
    _title = title;
    self.titleLabel.text = title;
}

@end
